﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SheepStorage.Domain.Enum;
using SheepStorage.Domain.lishunEnum;

namespace SheepStorage.API.Controllers
{
    /// <summary>
    /// 枚举
    /// </summary>

    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EnumController : ControllerBase
    {


        /// <summary>
        /// 品种等级
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordVarietyEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordVarietyEnum item in Enum.GetValues(typeof(SheepRecordVarietyEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 栋舍类型
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowBuildingTypeEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (BuildingType item in Enum.GetValues(typeof(BuildingType)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 生长阶段
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordGrowthEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordGrowthEnum item in Enum.GetValues(typeof(SheepRecordGrowthEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 羊只类型
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordTypeEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordTypeEnum item in Enum.GetValues(typeof(SheepRecordTypeEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }
            

            return Ok(list);
        }

        /// <summary>
        /// 基因等级
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordGeneEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordGeneEnum item in Enum.GetValues(typeof(SheepRecordGeneEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 生产等级
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordProductionEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordProductionEnum item in Enum.GetValues(typeof(SheepRecordProductionEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }
        /// <summary>
        /// 销售等级
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordMarketEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordMarketEnum item in Enum.GetValues(typeof(SheepRecordMarketEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 繁殖状态
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordBreedStateEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordBreedStateEnum item in Enum.GetValues(typeof(SheepRecordBreedStateEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 在场状态
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordPresentStateEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordPresentStateEnum item in Enum.GetValues(typeof(SheepRecordPresentStateEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 出生状态
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepRecordBirthStateEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepRecordBirthStateEnum item in Enum.GetValues(typeof(SheepRecordBirthStateEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }
        /// <summary>
        /// 戴标原因
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepMarkTaggingReasonEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepMarkTaggingReason item in Enum.GetValues(typeof(SheepMarkTaggingReason)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }
        /// <summary>
        /// 戴标状态
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepMarklabeledStateEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepMarklabeledState item in Enum.GetValues(typeof(SheepMarklabeledState)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }
        /// <summary>
        /// 死亡原因
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult ShowSheepDeathReasonEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (SheepDeathReasonEnum item in Enum.GetValues(typeof(SheepDeathReasonEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }
        /// <summary>
        /// 配种方式
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult MomHybridizationTypeEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (MomHybridizationTypeEnum item in Enum.GetValues(typeof(MomHybridizationTypeEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }

        /// <summary>
        /// 种母发情类型
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult MomHybridizationHeatTypeEnum()
        {
            //定义个集合把枚举值存进来
            List<object> list = new List<object>();
            foreach (MomHybridizationHeatTypeEnum item in Enum.GetValues(typeof(MomHybridizationHeatTypeEnum)))
            {
                list.Add(new
                {
                    //类型信息
                    name = item.ToString(),
                    //id
                    value = item
                });
            }

            return Ok(list);
        }






    }
}
